import React from 'react';
import {
    render
} from 'react-dom';
import {
    Provider
} from 'react-redux';
import {
    createStore
} from 'redux';

import App from './containers/App';
import TodoApp from './reducers/TodoApp';

let store = createStore(TodoApp);
store.subscribe(() => {
    localStorage['todos'] = JSON.stringify(store.getState());
})

render(
    <Provider store={store}>
        <App />
    </Provider>,
    document.getElementById('container')
);